package com.ug.common.enums;

/**
 * @Author LY
 * @create 2024/8/5 9:34
 * @Description 异常Code信息
 */
public enum ErrorCode {

    SUCCESS(1001, "成功"),
    FAILURE(2001, "失败"),
    PARAMS_INVALID(2002, "参数错误"),
    ACCOUNT_NOT_ACTIVATED(2003, "账号未激活"),
    USERNAME_IS_NULL(2004, "用户名不能为空"),
    PASSWORD_IS_NULL(2005, "密码不能为空"),
    INI_PASSWORD_ERROR(2006, "原密码错误，请重新输入"),
    NEW_PASSWORD_ERROR(2007, "新密码与确认密码不相同，请重新输入"),
    USERNAME_OR_PASSWORD_ERROR(2008, "用户名或密码错误"),
    USERNAME_OR_NICKNAME_ERROR(2009, "用户名或昵称已存在，请重新输入"),
    ROLE_REPETITION_ERROR(2010, "角色代码或名称已存在，请重新输入"),
    ROLE_BIND_ERROR(2011, "该角色已绑定用户，请解绑后再删除"),
    ROOT_ROLE_ERROR(2012, "超级管理员拥有所有权限，无需授权"),
    NOT_ROLE_ERROR(2013, "当前角色不存在"),
    MENU_BIND_ERROR(2014, "该菜单已绑定角色，无法删除"),
    DIRE_EDIT_ERROR(2015, "缺少上级目录，编辑失败"),
    SERVER_EXCEPTION(2016, "服务器异常"),
    USER_NOT_LOGIN(2017, "用户未登录"),
    TOKEN_EXPIRE(2018, "Token已过期"),
    TOKEN_NON(2019, "Token不支持"),
    TOKEN_INC_FOTMAT(2020, "Token格式不正确"),
    TOKEN_SIGN_EXPIRE(2021, "Token签名无效"),
    TOKEN_NOT_NULL(2022, "Token不能为空"),
    CAPTCHA_VERIFY_ERROR(2023, "验证码校验失败"),
    CAPTCHA_VERIFY_EXPIRE(2024, "验证码已过期"),
    COMMON_NO_AUTHORIZATION(2025, "请求接口：{} 失败，用户未授权"),
    COMMON_REQUEST_TOO_OFTEN(2026, "调用太过频繁"),
    REDIS_INFO_ERROR(2026, "获取Redis监控信息失败"),
    NAME_OR_CODE_ERROR(2027, "字典名称或字典编号已存在，请重新输入"),
    QUICK_LOGIN_ERROR(2028, "快捷登录失败");

    private final Integer code;
    private final String mesaage;

    ErrorCode(Integer code, String mesaage) {
        this.code = code;
        this.mesaage = mesaage;
    }

    public Integer getCode() {
        return code;
    }

    public String getMesaage() {
        return mesaage;
    }
}
